<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/V_PROC_PROCESSListEQU.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/V_PROC_PROCESSListEQU.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ProcessList_Id',
                footer: "Foots",
                cnName: '工序关联设备',
                name: 'workbusiness/V_PROC_PROCESSListEQU',
                url: "/V_PROC_PROCESSListEQU/",
                sortName: "OrderCode"
            });
            const editFormFields = ref({"Process_Id":""});
            const editFormOptions = ref([[{"dataKey":"工艺路线","data":[],"title":"工艺","required":true,"field":"Process_Id","type":"select"}]]);
            const searchFormFields = ref({"OrderCode":"","Process_Id":""});
            const searchFormOptions = ref([[{"dataKey":"工单（没有Id）","data":[],"title":"工单","field":"OrderCode","type":"select"},{"dataKey":"工艺路线","data":[],"title":"工艺","field":"Process_Id","type":"select"}]]);
            const columns = ref([{field:'Order_Id',title:'Order_Id',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Equipment_Id',title:'Equipment_Id',type:'string',width:110,hidden:true,align:'left'},
                       {field:'EquipmentCode',title:'EquipmentCode',type:'string',width:110,hidden:true,align:'left'},
                       {field:'OrderCode',title:'工单',type:'string',bind:{ key:'工单（没有Id）',data:[]},width:110,align:'left',sort:true},
                       {field:'ProcessNameZH',title:'工艺',type:'string',width:110,align:'left'},
                       {field:'ProcessList_Id',title:'ProcessList_Id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Process_Id',title:'工艺',type:'guid',bind:{ key:'工艺路线',data:[]},width:110,hidden:true,require:true,align:'left'},
                       {field:'OperationId',title:'工序',type:'string',width:110,hidden:true,require:true,align:'left'},
                       {field:'CreateBy',title:'CreateBy',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'CreateOn',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'UpdateBy',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'LastUpdateOn',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'IsDeleted',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'OperationName',title:'工序',type:'string',width:110,align:'left'},
                       {field:'TaskNameZH',title:'TaskNameZH',type:'string',width:110,align:'left'},
                       {field:'EQUTask_Id',title:'EQUTask_Id',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'OperationCode',title:'OperationCode',type:'string',width:120,align:'left'}]);
            const detail = ref({
                cnName: "工艺工序设备关联",
                table: "PROC_PROCESSList_EQU",
                columns: [{field:'Id',title:'Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProcessList_Id',title:'ProcessList_Id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Equipment_Id',title:'设备',type:'string',bind:{ key:'设备',data:[]},width:110,edit:{type:'select'},require:true,align:'left',sort:true},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除  0/不删除  1/已删除',type:'bool',width:110,hidden:true,align:'left'}],
                sortName: "CreateOn",
                key: "Id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
